package yxy.cherry.battle.module.record.result;

import java.util.ArrayList;
import java.util.HashMap;

import yxy.cherry.battle.module.record.FighterPosition;

public class Statistic {
	private HashMap<FighterPosition, StatisticFighter> fighters = new HashMap<>();

	public StatisticFighter getFighter(FighterPosition pos) {
		StatisticFighter fighter = fighters.get(pos);
		if (fighter == null) {
			fighter = new StatisticFighter();
			fighter.setPos(pos);
			fighters.put(fighter.getPos(), fighter);
		}
		return fighters.get(pos);
	}

	public ArrayList<StatisticFighter> getFighters() {
		return new ArrayList<>(fighters.values());
	}

}
